//
// Created by 11510 on 2024/6/17.
//
#include <iostream>
using namespace std;

class Base{
private:
    long base = 10;
public:
    Base(long base):base(base){
        printf("Base()\n");
    }
    void print(){
        printf("this is Base print\n");
    }
    ~Base(){
        printf("~Base()\n");
    }
};

class Test{
private:
    long test;
public:
    Test(long test): test(test){
        cout << "Test()" << endl;
    }
    ~Test(){
        cout << "~Test()" << endl;
    }
};



class Derived: public Base{
private:
    long derived = 100;
    Test test;
    Base base1;
public:
    Derived(long base, long derived, long test, long base1):
    Base(base),
    derived(derived),
    test(test),
    base1(base1)/* 显式调用对象成员的构造函数 */{
        printf("Derived()\n");
    }
    ~Derived(){
        printf("~Derived()\n");
    }
};



void test0(){
    Derived derived(1, 2, 8, 7);
//    derived.print();
//    printf("Derived byte %ld\n", sizeof(Derived));
}


int main() {
    test0();
    return 0;
}
